using UnityEngine;
using System.IO;

public class LoadAssetBundle : MonoBehaviour
{
    void Start()
    {
        string path = Path.Combine(Application.streamingAssetsPath, "character");
        AssetBundle bundle = AssetBundle.LoadFromFile(path);
        if (bundle == null)
        {
            Debug.LogError("Failed to load AssetBundle!");
            return;
        }
        GameObject playerPrefab = bundle.LoadAsset<GameObject>("Player");
        Instantiate(playerPrefab);
    }
}